var Script = function() {
	$().ready(function() {
		var $addForm = $("#addForm"), $submit = $addForm.find(":submit");
		$submit.prop("disabled", false);
		$addForm.validate({
			rules : {
				password : {
					minlength : 5,
					maxlength : 16
				},
				repassword : {
					equalTo : "#password"
				},
				idNo : {
					minlength : 15,
					maxlength : 18,
				},
				phone : {
					required : true,
					minlength : 11,
					maxlength : 11
				},
				realName : {
					required : true,
					minlength : 2,
					maxlength : 10
				},
				wxName:{
					required : true,
					minlength : 2,
					maxlength : 16
				}

			},
			messages : {
				password : {
					minlength : "管理员密码长度5-16",
					maxlength : "管理员密码长度5-16"
				},
				repassword : {
					equalTo : "确认密码不一致"
				},
				idNo : {
					minlength : "身份证号码为15-18位",
					maxlength : "身份证号码为15-18位",
				},
				phone : {
					required : "手机号码不能为空",
					minlength : "手机号码长度为11",
					maxlength : "手机号码长度为11"
				},
				realName : {
					required : "真实姓名不能为空",
					minlength : "真实姓名的长度为2-5",
					maxlength : "真实姓名的长度为2-5"
				},
				wxName:{
					required : "微信帐号不能为空",
					minlength : "微信帐号长度为2-16",
					maxlength : "微信帐号长度为2-16"
				}
			}
		});
	});

}();